1. Field of the Invention
The present invention relates to a vector image generation method, an image processing apparatus that generates a vector image, and so on.
2. Description of Related Art
It has recently become common to scan paper documents using a scanner and store the scanned documents in digitized form. The documents thus scanned by the scanner are stored, for example, as image data in a bitmap format.
The bitmap format expresses characters as a group of dots (pixels), and thus it is not necessary to perform complex calculations when displaying or printing those characters. However, the bitmap format has a disadvantage in that “jaggies” (aliasing artifacts) may be noticeably visible in the contours of the characters outputted, depending on the resolution of the apparatus (output apparatus) that outputs the characters.
In view of this, a process called “outlining” has therefore been conventionally performed so as to convert bitmap images into vector font images (vector images).
In a vector image, a character is reproduced by forming contour lines by approximating the contours of the character to straight lines and curved lines and then filling in the regions surrounded by those contour lines, which renders jaggies less apparent. Furthermore, because the outputted result does not depend on the resolution of the output apparatus, the image quality of character portions can be stabilized easily even if the output apparatus changes.
However, images that are scanned by a scanner are slightly inclined, usually. When the inclined characters are outlined, the contours of the characters may include aliasing artifacts or may be distorted. To cope with this, it can be conceived to reduce the distortion by correcting the inclination of the characters. In this respect, there have been proposed such methods as disclosed in JP-2002-077566-A and JP-H05-046752-A.
According to the method disclosed in JP-2002-077566-A, contours of images on the document are extracted, and the contours thus extracted are approximated by straight lines to thereby generate a plurality of straight lines. One is selected from among the plurality of straight lines thus generated as a straight line serving as a reference for correcting the inclination. Then, a rotation correction parameter required for correcting the inclination is calculated based on line segment information indicated by the selected line, and the inclination is corrected based on the rotation correction parameter.
According to the method disclosed in JP-H05-046752-A, first, an outline vector loop corresponding to framed graphics is detected from vector information of an image. Then, four apexes of the framed graphics are obtained based on a center point of a quadrate within which the outline vector is inscribed. Reference points corresponding respectively to the obtained four apexes are set up. Then, the inclination of drawing is corrected by rotating the coordinates around the respective reference points.
However, when the inclination correction process is performed on image data in a raster format prior to performing outlining, it involves a large amount of calculation and may take a long time.
Further, there may also be characters that are not inclined as a result of scanning but are intentionally arranged to incline. For such characters, the processing efficiency is further worsened because the processing involves outlining after an inclination correction process and, in addition, performing a process of reverting the inclination to the original inclination.